package com.neusoft.bigdata.hbase.model;

import java.util.ArrayList;
import java.util.List;

/**
 * 监控数据模型类
 * 
 * @author lihzh
 * @date 2012-11-21 下午6:43:16
 */
public class MetricData {
	
	public MetricData(String metricName) {
		this.metricName = metricName;
	}

	private String metricName;
	private List<DataPoint> dataPoints = new ArrayList<DataPoint>();

	public String getMetricName() {
		return metricName;
	}

	public void setMetricName(String metricName) {
		this.metricName = metricName;
	}

	public List<DataPoint> getDataPoints() {
		return dataPoints;
	}
	
	public void addAllDataPoint(List<DataPoint> points) {
		dataPoints.addAll(points);
	}

	public void addDataPoint(Double value, long time) {
		DataPoint point = new DataPoint();
		point.setTimeStamp(time);
		point.setValue(value);
		dataPoints.add(point);
	}

}
